<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <meta charset="utf-8">
    <title>处理用户注册请求</title>
  </head>
  
  <body>
  	<%
  		// post 提交解决中文乱码，设置请求的字符编码格式
  		// 在请求前设置
  		request.setCharacterEncoding("UTF-8") ;
  		
  		String userName = request.getParameter("userName") ;
  		// get 提交解决中文乱码，重新转码，构造新的字符串
  		//userName = new String(userName.getBytes("ISO-8859-1"),"UTF-8") ;
  		String userPass = request.getParameter("userPwd") ;
  		// get 提交解决中文乱码，重新转码，构造新的字符串
  		//userPass = new String(userPass.getBytes("ISO-8890-1"),"UTF-8");
  		String email = request.getParameter("email") ;
  		// get 提交解决中文乱码，重新转码，构造新的字符串
  		//email = new String(email.getBytes("ISO-8890-1"),"UTF-8");
  		
  		String [] interest = request.getParameterValues("interest") ;
  	 %>
    <h1>用户的注册信息如下：</h1>
    <h2>用户名：<%=userName %></h2>
    <h2>用户密码：<%=userPass %></h2>
    <h2>用户邮箱：<%=email %></h2>
    <h2>爱好：<%=Arrays.toString(interest) %></h2>
  </body>
</html>
